package by.twouexplorer;



import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class StartScreen extends Activity{
	
	public static String rootSDBrowseAction="twouexplorer.by.ROOT_SD_BROWSE";
	public static String downloadBrowseAction="twouexplorer.by.DOWNLOAD_BROWSE";
	public static String galleryBrowseAction="twouexplorer.by.DCIM_BROWSE";
	public static String musicBrowseAction="twouexplorer.by.MUSIC_BROWSE";
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.start_screen);
		
		Button fileBrowserButton = (Button) findViewById(R.id.fileBrowserButton);
		Button downloadsButton = (Button) findViewById(R.id.downloadsButton);
		Button galleryButton = (Button) findViewById(R.id.galleryButton);
		Button favouritesButton = (Button) findViewById(R.id.favouritesButton);
				
		//final Toast toast = Toast.makeText(getApplicationContext(), "In process", 2000);
		fileBrowserButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// TODO Auto-generated method stub
				//Intent fileBrowserIntent = new Intent(StartScreen.this, TwoUExplorerMain.class);
				Intent fileBrowserIntent = new Intent();
				fileBrowserIntent.setAction(rootSDBrowseAction);
				fileBrowserIntent.setClass(getApplicationContext(), TwoUExplorerMain.class);
				startActivity(fileBrowserIntent);
				
			}
		});
		
		downloadsButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent fileBrowserIntent = new Intent();
				fileBrowserIntent.setAction(downloadBrowseAction);
				fileBrowserIntent.setClass(getApplicationContext(), TwoUExplorerMain.class);
				startActivity(fileBrowserIntent);
			}
		});
		
		galleryButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent fileBrowserIntent = new Intent();
				fileBrowserIntent.setAction(galleryBrowseAction);
				fileBrowserIntent.setClass(getApplicationContext(), TwoUExplorerMain.class);
				startActivity(fileBrowserIntent);
			}
		});
		
		favouritesButton.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent fileBrowserIntent = new Intent();
				fileBrowserIntent.setAction(musicBrowseAction);
				fileBrowserIntent.setClass(getApplicationContext(), TwoUExplorerMain.class);
				startActivity(fileBrowserIntent);
			}
		});
		
		
		
		
	}
}
